package wang.ddcat.reptilian_plus.util;

import java.util.Map;

public class MapUtil {

    public static Integer getKeyIsInt(Map<Integer,Object> map, String value){
        Integer key = 0;
        for (Map.Entry<Integer, Object> entry : map.entrySet()) {
            if(value.contains(entry.getValue().toString())){
                key=entry.getKey();
            }
        }
        return key;
    }

    public static Object getKeyIsObj(Map<Object,Object> map, String value){
        Object key = 0;
        for (Map.Entry<Object, Object> entry : map.entrySet()) {
            if(value.contains(entry.getValue().toString())){
                key=entry.getKey();
            }
        }
        return key;
    }

}
